package com.pengshun.modules.api.user.para;

import com.pengshun.modules.api.coal.validator.*;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class UserPara {

    @NotNull(message = "手机号不能为空", groups = {First.class,Second.class,Fourth.class, Fifth.class })
    @Pattern(regexp = RegularExpression.PHONE, message = "手机号码格式错误", groups = {First.class,Second.class,Fourth.class, Fifth.class})
    private String phone;

    @NotNull(message = "验证码不能为空", groups = { Fifth.class })
    private String code;

    @NotNull(message = "手机号不能为空", groups = {Fourth.class, Fifth.class})
    private String pass;

    @NotNull(message = "oldPass不能为空", groups = {Third.class})
    private String oldPass;

    @NotNull(message = "newPass不能为空", groups = {Third.class,Sixth.class})
    private String newPass;
    private String oldPayPass;
    private String payPass;
    private String avatarName;
    private String nickName;
    private String deviceId;

    private Long  id;

    @NotNull(message = "类型不能为空", groups = {First.class})
    private  String type;

    @NotNull(message = "类型不能为空", groups = {Seventh.class})
    private Integer userType;

    private String openid;

}
